package com.mac.livedatabus

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.lifecycle.Observer
import kotlinx.android.synthetic.main.activity_thrid.*

class ThirdActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_thrid)

        LiveDataBus.get<String>(Constant.TEST_KEY)
            .observeSticky(this, Observer {
                thirdTv.append(it)
                thirdTv.append("\n")
            })
    }
}
